/**
 * <p>Copyright (c) 2017 深圳市鹏途交通科技有限公司 </p>
 * <p>				   All right reserved. 		     </p>
 * 
 * <p>项目名称 ： 	深圳市国省检日常化监管系统         </p>
 * <p>创建者   :	heyong 
 * 
 * <p>描   述  :   BuildingEffects.java for com.pengtu.gsj.entity.yh    </p>
 * 
 * <p>最后修改 : $: Aug 31, 2017-3:37:05 PM v 1.0.0	 heyong   $ </p>
 * 
*/

package com.pengtu.gsj.entity.yh;

import java.util.List;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.persistence.Transient;

import com.pengtu.gsj.entity.app.Attachment;
import com.pengtu.gsj.entity.base.IdEntity;

/**
 * 
 * BuildingEffects
 * 
 * Aug 31, 2017 3:37:05 PM
 * 
 * @version 1.0.0
 * 
 */
@Entity
@Table(name = "T_YH_BUILDINGEFFECTS")
public class BuildingEffects extends IdEntity{

	private static final long serialVersionUID = 1L;
	private String roadName;					//道路名称
	private String roadNo;						//道路编号
	private Double roadLength;					//道路长度
	private String checkYear;					//检查年份
	private Integer satisfyNum;					//满足三推进五提高数量
	private Integer unSatisfyNum;				//不满足数量
	private String demonstrationEffect;			//示范效果
	private String remark;						//备注
	
	private Integer bulletinNumber;   //文件数
	private List<Attachment> attachments;
	
	public BuildingEffects(){
		
	}
	
	public BuildingEffects (String id, String roadName){
		this.id = id;
		this.roadName = roadName;
	}
	
	@Column(name = "ROADNAME")
	public String getRoadName() {
		return roadName;
	}
	@Column(name = "ROADNO")
	public String getRoadNo() {
		return roadNo;
	}
	@Column(name = "ROADLENGTH")
	public Double getRoadLength() {
		return roadLength;
	}
	@Column(name = "CHECKYEAR")
	public String getCheckYear() {
		return checkYear;
	}
	@Column(name = "SATISFYNUM")
	public Integer getSatisfyNum() {
		return satisfyNum;
	}
	@Column(name = "UNSATISFYNUM")
	public Integer getUnSatisfyNum() {
		return unSatisfyNum;
	}
	@Column(name = "DEMONSTRATIONEFFECT")
	public String getDemonstrationEffect() {
		return demonstrationEffect;
	}
	@Column(name = "REMARK")
	public String getRemark() {
		return remark;
	}
	
	
	public void setRoadName(String roadName) {
		this.roadName = roadName;
	}
	public void setRoadNo(String roadNo) {
		this.roadNo = roadNo;
	}
	public void setRoadLength(Double roadLength) {
		this.roadLength = roadLength;
	}
	public void setCheckYear(String checkYear) {
		this.checkYear = checkYear;
	}
	public void setSatisfyNum(Integer satisfyNum) {
		this.satisfyNum = satisfyNum;
	}
	public void setUnSatisfyNum(Integer unSatisfyNum) {
		this.unSatisfyNum = unSatisfyNum;
	}
	public void setDemonstrationEffect(String demonstrationEffect) {
		this.demonstrationEffect = demonstrationEffect;
	}
	public void setRemark(String remark) {
		this.remark = remark;
	}
	
	
	@Transient
	public Integer getBulletinNumber() {
		bulletinNumber = attachments.size();
		return bulletinNumber;
	}

	public void setBulletinNumber(Integer bulletinNumber) {
		this.bulletinNumber = bulletinNumber;
	}

	@OneToMany(fetch = FetchType.LAZY)
	@JoinColumn(name = "PARTID")
	public List<Attachment> getAttachments() {
		return attachments;
	}

	public void setAttachments(List<Attachment> attachments) {
		this.attachments = attachments;
	}

}
